package com.zls.controller;

import com.zls.pojo.User;
import com.zls.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class AxiosController {
    @Autowired
    private UserService userService;
    @GetMapping("/all")
    public List<User> selectAll(){
        List<User> list = userService.list();
        System.out.println("我进来了");
        return list;
    }
}
